﻿@page
@{ Layout = "_Layout"; }

<div style="padding:0 11px;">
    <el-form v-on:submit.native.prevent :inline="true" :model="formInline" :size="euiSize">
        <el-form-item label="用户">
            <el-input prefix-icon="el-icon-search" clearable v-model="formInline.keyword" placeholder="关键字"></el-input>
        </el-form-item>
        <el-form-item label="时间：从">
            <el-date-picker v-model="formInline.dateFrom"
                            type="date"
                            value-format="yyyy-MM-ddTHH:mm:ss.000Z"
                            placeholder="选择开始日期">
            </el-date-picker>
        </el-form-item>
        <el-form-item label="到">
            <el-date-picker v-model="formInline.dateTo"
                            type="date"
                            value-format="yyyy-MM-ddTHH:mm:ss.000Z"
                            placeholder="选择结束日期">
            </el-date-picker>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" v-on:click="btnSearchClick" icon="el-icon-search">查 询</el-button>
        </el-form-item>
    </el-form>
    <el-table :data="items" :size="euiSize"
              style="width: 100%">
        <el-table-column label="#"
                         type="index"
                         width="60"
                         align="left">
            <template scope="scope">
                <span>{{(formInline.currentPage - 1) * formInline.limit + scope.$index + 1}}</span>
            </template>
        </el-table-column>
        <el-table-column label="账号" show-overflow-tooltip>
            <template slot-scope="scope">
                <el-link :underline="false" type="primary" v-on:click="utils.openUserView(scope.row.id)">{{scope.row.userName}}</el-link>
            </template>
        </el-table-column>
        <el-table-column prop="displayName" show-overflow-tooltip
                         label="姓名">
        </el-table-column>
        <template v-if="systemCode==='Elearning'">
            <el-table-column prop="credit"
                             label="学分">
            </el-table-column>
            <el-table-column label="学时">
                <template slot-scope="scope">
                    {{ utils.formatDuration(scope.row.duration) }}
                </template>
            </el-table-column>
            <el-table-column prop="plan"
                             label="学习任务">
            </el-table-column>
            <el-table-column prop="course"
                             label="课程">
            </el-table-column>
        </template>
        <el-table-column prop="pointTotal" label="积分">
        </el-table-column>
        <el-table-column prop="exam"
                         label="考试">
        </el-table-column>
        <el-table-column prop="examMoni"
                         label="模拟">
        </el-table-column>
        <el-table-column prop="examQ"
                         label="问卷">
        </el-table-column>
        <el-table-column prop="examAss"
                         label="测评">
        </el-table-column>
        <el-table-column prop="practice"
                         label="刷题">
        </el-table-column>
        <el-table-column prop="cer"
                         label="获得证书">
        </el-table-column>
        <el-table-column prop="loginTotal"
                         label="登录次数">
        </el-table-column>
        <el-table-column label="状态" width="80">
            <template slot-scope="scope">
                <el-tag type="danger" size="mini" v-if="scope.row.locked">禁用</el-tag>
                <el-tag type="success" size="mini" v-else>启用</el-tag>
            </template>
        </el-table-column>
        <el-table-column align="right" width="100" fixed="right">
            <template slot-scope="scope">
                <el-button plain size="mini" type="primary" v-on:click="btnDocClick(scope.row.id)" icon="el-icon-document">详 细</el-button>
            </template>
        </el-table-column>
        @await Html.PartialAsync("_PartialTableEmpty")
    </el-table>
    <div style="text-align: center; margin-top: 10px;">
        <el-pagination v-on:current-change="handleCurrentChange" background
                       :current-page="formInline.currentPage"
                       :page-size="formInline.limit"
                       layout="total, prev, pager, next, jumper"
                       :total="count">
        </el-pagination>
    </div>
</div>

@section Scripts{
    <script src="/sitefiles/assets/js/admin/settings/usersDoc.js" type="text/javascript"></script>
}